import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import { ERoutePath } from ':/defined/route';
import Home from ':/pages/Home';
import { FC } from 'react';
import { baseUrl } from '@/app';

const router = createBrowserRouter(
  [
    {
      path: ERoutePath.ROOT,
      children: [
        {
          index: true,
          Component: Home,
        },
      ],
    },
  ],
  {
    basename: baseUrl,
  },
);

const AppRoutes: FC = () => {
  return <RouterProvider router={router} />;
};

export default AppRoutes;